#include "Graphics/Pass.h"

#include "Framework/StableHeaders.h"

namespace tyro
{
	namespace Graphics
	{


		Pass::Pass()
			:	ambient(Colour(0.2f, 0.2f, 0.2f))
			,	diffuse(Colour::White)
			,	specular(Colour::Black)
			,	emissive(Colour::Black)
		{

		}

		Pass::Pass( Technique* parent, UINT_16 index )
			:	parent(parent)
			,	index(index)
			,	ambient(Colour(0.2f, 0.2f, 0.2f))
			,	diffuse(Colour::White)
			,	specular(Colour::Black)
			,	emissive(Colour::Black)
			,	shininess(0)
		{

			 std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > stream;
			 stream << index;
			 name = stream.str();
		}

		void Pass::SetAmbient( FLOAT_32 red, FLOAT_32 green, FLOAT_32 blue )
		{
			ambient.red = red;
			ambient.green = green;
			ambient.blue = blue;
		}

		const Colour& Pass::GetAmbient() const
		{
			return ambient;
		}

		const Colour& Pass::GetDiffuse() const
		{
			return diffuse;
		}

		const Colour& Pass::GetSpecular() const
		{
			return specular;
		}

		const Colour& Pass::GetEmmisive() const
		{
			return emissive;
		}

		const FLOAT_32 Pass::GetShininess() const
		{
			return shininess;
		}

	}
}